import JSEncrypt from 'jsencrypt'

const RSA = {

	/**
     * RSA加密
     * @param str
     * @returns {*}
     */
    cmdRSAEncrypt (str){
        const key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWNDzydQaa4A5MYSbsqDt1y1j5ZK+1m9sm/agQpiHAUEF3eagDgztUKNDazHE5M/YS4M0llTfL6+N3dnbbSd8xtTv+K/mV4g47iZXWlbHreLYbgXzLOLdhCWgppyrMYxCJn+fBuZPh4NgH0doi91JPMWaj/lJMbgXAYVdWB4e3dwIDAQAB";
        let encrypt = new JSEncrypt();
        encrypt.setPublicKey(key);
        return encrypt.encrypt(str);
    }
}

export default RSA;